<?php
namespace Home\Widget;

use Think\Controller;

class NewWidget extends Controller{
    public function hotBlog(){
        
        // 获取5篇最热的文章
        $blog_M = M('blog');
        $blog_re = $blog_M->order('count desc')->limit(5)->select();
        
        $this->assign('blog_re',$blog_re);
        
        $this->display('Widget/hotBlog');
    }
}